#!/bin/bash
# $Id$

# DESCRIPTION:
# Builds language pack

BUILD_DIR=../../maori-mozilla
INPUT_DIR=/var/lib/pootle/firefox_30/mi
OUTPUT_DIR=$HOME/tmp


date=$(date '+%Y%m%d')
echo "${date}" > ${BUILD_DIR}/build/VERSION

cd ${BUILD_DIR}/l10n

rm -rf "mi.${date}"
po2moz -x '*.stats' -x '*.pending' -t 'en-US' "${INPUT_DIR}" "mi.${date}"

cd ../customize
make distclean
make
cp firefox-3.0.*-beta.mi.langpack.xpi $OUTPUT_DIR/
cp update.rdf $OUTPUT_DIR/
